/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.sai.sql;

/**
 *
 * @author Eduardo
 */
public class SqlIntegradora {
    
    public static final String SELECT;
    public static final String SELECT_ALL;
    public static final String INSERT;
    public static final String UPDATE_AFTER_UPDATE;
    
    static {
        StringBuilder qryBuilder = new StringBuilder();

        qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT * FROM articulo WHERE nombre = ?");
        SELECT = qryBuilder.toString();

        qryBuilder = new StringBuilder();
        qryBuilder.append("SELECT * FROM articulo");
        SELECT_ALL = qryBuilder.toString();

        qryBuilder = new StringBuilder();
        qryBuilder.append("INSERT INTO articulo(nombre,estado,autor,ruta) values (?, 'Enviado', ?,?)");
        INSERT = qryBuilder.toString();
        
        qryBuilder = new StringBuilder();
        qryBuilder.append("UPDATE autores SET estado = 'Activo' WHERE id_autor = ?");
        UPDATE_AFTER_UPDATE = qryBuilder.toString();

     }
    
    
}
